export type CurrentTheme = 'light' | 'dark'

export type Theme = CurrentTheme | 'system'

export interface ThemeColors {
  primary: string
  error: string
  success: string
  warning: string
  info: string
}

export type ThemeColorKey =
  keyof PreferencesState['appearance']['theme']['themeColors']

export type CurrentLangeuage = 'zh_TW' | 'zh_CN' | 'en_US'

export type Language = CurrentLangeuage | 'auto'

export type BrowserLanguageList = Record<string, CurrentLangeuage>

export interface PreferencesState {
  appearance: {
    theme: {
      theme: Theme
      currentTheme: CurrentTheme
      themeColors: ThemeColors
    }
  }
  general: {
    lang: {
      language: Language
      currentLangeuage: CurrentLangeuage
      languageList: {
        name: string
        value: Language
      }[]
    }
  }
}
